package cn.com.czpb.client.module.personal.adapter;

import android.content.Context;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentStatePagerAdapter;
import android.view.View;
import android.widget.TextView;

import java.util.List;

/**
 * Created by Administrator on 2017/9/16.
 */

public class CodeFragmentadapter extends FragmentStatePagerAdapter {
    private List<Fragment> list;
    private String[] titles = new String[]{"邀请好友", "输入邀请码"};
    private Context context;
    View view;
    TextView tv;

    public CodeFragmentadapter(FragmentManager fm,List<Fragment> list, Context context) {
        super(fm);
        this.list = list;
        this.context = context;
    }

    @Override
    public Fragment getItem(int position) {

        return list.get(position);
    }

    @Override
    public int getCount() {
        return 2;
    }

    @Override
    public CharSequence getPageTitle(int position) {

        return titles[position];
//        return null;
    }

    @Override
    public int getItemPosition(Object object) {
        return POSITION_NONE;
    }
}
